package main

import (
	logger "github.com/sirupsen/logrus"

	"publish-manage/internal/controller/agent"
	"publish-manage/pkg/config"
	"publish-manage/pkg/server"
)

func main() {

	if config.IsSet("server.manageAddr") {
		// 连接管理端
		agent.InitWebsocket()
	} else { // 开启单机模式
		agent.InitRouter()
		logger.Error(server.Start(":" + config.GetString("server.port")))
	}
}
